from pykeyboard import PyKeyboardEvent


class MyPyKeyboardEvent(PyKeyboardEvent):
    def __init__(self):
        PyKeyboardEvent.__init__(self)

    def tap(self, keycode, character, press):
        print(keycode, character, press)

p = MyPyKeyboardEvent()
p.run()